import React from "react";
import { Button } from "antd";
import style from "./index.module.scss";
interface PrimaryButtonProps {
  onClick?: (value: any) => void;
  onEnterDown?: () => void;
  className?: string;
  register?: boolean;
  checked?: boolean;
  htmlType?: "submit" | "button";
}
export default function PrimaryButton(props: PrimaryButtonProps) {
  const {
    onClick,
    className = "",
    onEnterDown,
    register,
    checked,
    htmlType,
  } = props;
  // TODO:记住密码 - 登录成功存储到localStorage
  return (
    <Button
      onClick={onClick}
      className={className}
      htmlType={htmlType}
      onKeyDown={onEnterDown}
    >
      <div className={style["btn"]}>{register ? "注册" : "登录"}</div>
    </Button>
  );
}
